package com.hzdesk.media.matvector.koreabatch.client.my_paperless.logic.view;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.hzdesk.media.matvector.koreabatch.client.my_paperless.R;
import com.hzdesk.media.matvector.koreabatch.client.my_paperless.base.BaseActivity;
import com.hzdesk.media.matvector.koreabatch.client.my_paperless.custom_view.MyRecyclerView;
import com.hzdesk.media.matvector.koreabatch.client.my_paperless.logic.contract.IDevicesUndeMettingContract;
import com.hzdesk.media.matvector.koreabatch.client.my_paperless.logic.persenter.DevicesUndeMettingPersenter;

/**
 * Created by Administrator on 2018/8/9.
 * 杭州席媒科技有限公司  Developers  刘传华  10
 * 佛祖镇楼 bug辟易
 *
 *
 *   设备下的会议(8)
 */


public class DevicesUndeMettingPagerActivity  extends BaseActivity implements IDevicesUndeMettingContract.IDevicesUndeMettingView {


    private MyRecyclerView my_recylerview;
    private ImageView empty_view;
    private String TAG = DevicesUndeMettingPagerActivity.class.getSimpleName();
    private DevicesUndeMettingPersenter mDevicesUndeMettingPersenter = new DevicesUndeMettingPersenter(this);
    private RelativeLayout rl;

    @Override
    protected void userAgreedPermissions() {

    }

    @Override
    protected View AddLayoutView() {
        View view = View.inflate(this,R.layout.activity_devices_unde_metting,null);
        my_recylerview = view.findViewById(R.id.activity_devices_unde_metting_my_recylerview);
        empty_view = view.findViewById(R.id.iv_prompt_empty_view);
        rl = view.findViewById(R.id.my_recyclerview_empty_rl);
        return view;
    }
    // 初始化 操作
    @Override
    protected void initChildViewDate() {
        String id_devices_unde_metting_list =   getIntent().getStringExtra("devices_unde_metting_list");

        mDevicesUndeMettingPersenter.initTitle();
        mDevicesUndeMettingPersenter.initRecyclerView(my_recylerview,this);
        my_recylerview.setEmptyView(rl);
        empty_view.setImageResource(R.mipmap.error_view);

        mDevicesUndeMettingPersenter.loadDate(this,id_devices_unde_metting_list);
    }


    @Override
    protected void onClickedTvRight() {

    }

    @Override
    protected void onClickedIvRight() {

    }

    @Override
    protected void onClickedIvLeft() {
            finish();
    }

    @Override
    public void setTitle() {
        showTilteBg();
        showTitleContent();
        showTileIvLeft();
        //设备管理(6)
        setTitleContent("设备下的会议(8)", 0xffffffff);
        setIvLeftIcon(R.mipmap.left_white_return);
    }

    @Override
    public void toNextPager(String id) {
     //  toPageJump(SetCurrentMeetingActivity.class);
        Intent intent = new Intent(this,SetCurrentMeetingActivity.class);
        intent.putExtra("metting_info_id",id);
        startActivity(intent);
    }
}
